package Teacher_Test.HashMap;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class Mapdemo {
    public static void main(String[] args) {
        Map<Integer,String> map= new HashMap<>();
        map.put(1,"sea");
        map.put(2,"son");
        map.put(3,"aaa");
        System.out.println(map.get(1));
        System.out.println(map.get(2));
        System.out.println(map.get(3));

        Iterator<Integer> iterator = map.keySet().iterator();
        while (iterator.hasNext()){
            int a= iterator.next();
            System.out.println(a+ "   "+map.get(a));
        }



//        Map<Key,Value> map1= new TreeMap<>()
    }
}
